import config from "@/config"
import http from "@/utils/request"

export default {
	addOrUpdateRole: {
		url: `${config.API_URL}/v1/sysrole/addorupdate`,
		name: "添加/更新角色",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
    roleList: {
        url: `${config.API_URL}/v1/sysrole/page`,
		name: "角色列表分页",
		post: async function(data={}){
			return await http.get(this.url, data);
		}
    },
    addRoleMenu:{
        url: `${config.API_URL}/v1/sysrolemenu/add`,
		name: "角色授权",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
    },
    getMenusByRoleId:{
        url: `${config.API_URL}/v1/sysrolemenu/getrolemenulist`,
		name: "获取菜单列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
    }
}